/**
 * webpack 处理完成后，需要手动修改 process 的问题
 * */

const fs = require('fs');
const path = require('path');
const {
    buildPath,
    curPath,
} = require('./../buildSetting');

fs.writeFileSync(path.join(curPath, 'dist', 'main.js'), fs.readFileSync(path.join(curPath, 'dist', 'main.js'), 'utf-8').replace(/\(process\)/g, '()'), 'utf-8');
fs.writeFileSync(path.join(buildPath, 'main.js'), fs.readFileSync(path.join(buildPath, 'main.js'), 'utf-8').replace(/\(process\)/g, '()'), 'utf-8');
